﻿<%@ Page Title="Lista de Visitas" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Visita.aspx.cs" Inherits="Follow.Cadastros.Visita" %>
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>


<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="Titulo">
        <%: Title %><br />
        <asp:Image ID="imgTitulo" runat="server" ImageUrl="~/images/linhas_17.png" />
    </div>
    <asp:Label ID="lblMsgSucesso" runat="server" CssClass="lblMsg" Visible="false" /><br />
    <asp:MultiView ID="mvVisitas" runat="server" ActiveViewIndex="0">
        <asp:View ID="View1" runat="server">
            <div class="subTitulo">
                <asp:Label ID="lblTitulo1" runat="server" Text="Lista de Visitas" />
            </div>           
            <div id="divMsg1" class="isa_info" runat="server" visible="false" >
                <asp:Label ID="lblMsg1" runat="server" Text="Mensagem." />
            </div>
            <div class="divPesquisa">
                <asp:Label ID="lblPesquisa" Text="Pesquisa por nome funcionário :" runat="server" /><br />
                <asp:TextBox ID="txtPesquisa" runat="server" Width="300px" Height="25px" />
                <asp:Button ID="btnPesquisa" runat="server" Text="Pesquisar" OnClick="btnPesquisa_Click"
                    CssClass="Botao" />
                <asp:Button ID="btnIncluir" runat="server" Text="Incluir" OnClick="btnIncluir_Click"
                    CssClass="Botao" /><br />
            </div>
            <br />
            <br />
            <asp:GridView ID="gvVisitas" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                DataKeyNames="IDVisita" OnRowCommand="gvVisitas_RowCommand"  Width="765px"
                BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" 
                CellPadding="4" ForeColor="Black" GridLines="Vertical" 
                onselectedindexchanged="gvVisitas_SelectedIndexChanged" OnPageIndexChanging="gvVisitas_PageIndexChanging" >
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:BoundField HeaderText="Funcionário" DataField="NomeFuncionario" />
                    <asp:BoundField HeaderText="Cliente" DataField="NomeCliente" ItemStyle-HorizontalAlign="Center"/>
                    <asp:BoundField HeaderText="Data da Visita" DataField="DataVisita" ItemStyle-HorizontalAlign="Center"/>
                    <asp:ButtonField ButtonType="image" ImageUrl="~/Images/editar.png" CommandName="Editar"
                        HeaderText="Editar" ItemStyle-HorizontalAlign="Center" />
                        <asp:ButtonField ButtonType="image" ImageUrl="~/Images/excluir.png" CommandName="Excluir"
                        HeaderText="Excluir" ItemStyle-HorizontalAlign="Center" />

                </Columns>
                <FooterStyle BackColor="#CCCC99" />
                <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                <RowStyle BackColor="#F7F7DE" />
                <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#FBFBF2" />
                <SortedAscendingHeaderStyle BackColor="#848384" />
                <SortedDescendingCellStyle BackColor="#EAEAD3" />
                <SortedDescendingHeaderStyle BackColor="#575357" />
            </asp:GridView>
        </asp:View>
        <asp:View ID="View2" runat="server">
             <div class="subTitulo">
                <asp:Label ID="lblTitulo2" runat="server" Text="Editar Visita" />
            </div>
            <div id="divMsg2" class="isa_info" runat="server" visible="false" >
                <asp:Label ID="lblMsg2" runat="server" Text="Mensagem." />
            </div>
            <asp:HiddenField ID="IDVisita" runat="server" />
             <asp:Label ID="lblCliente" runat="server" Text="Cliente:" />
            <br />
            <asp:DropDownList ID="ddlCliente" runat="server">
            </asp:DropDownList>
            <br />
            <br />
            <asp:Label ID="lblFuncionario" runat="server" Text="Funcionário:" />
            <br />
            <asp:DropDownList ID="ddlFuncionario" runat="server">
            </asp:DropDownList>
            <br />
            <br />
            <asp:Label ID="lblDataVisita" runat="server" Text="Data da visita:" />
            <asp:TextBox ID="txtDataVisita" runat="server" TextMode="DateTime" />
            <asp:RequiredFieldValidator ID="rfvDataVisita" runat="server" ErrorMessage="* Campo data não preenchido."
                ForeColor="Red" ControlToValidate="txtDataVisita" Font-Size="X-Small"></asp:RequiredFieldValidator>
               <asp:MaskedEditExtender ID="DataNasc_MaskedEditExtender" runat="server" AutoComplete="false"
                    ClearMaskOnLostFocus="False" Mask="99/99/9999 99:99:99" MaskType="DateTime"  TargetControlID="txtDataVisita">
               </asp:MaskedEditExtender>
             <br />
            <br />
            <asp:Label ID="lblObservacao" runat="server" Text="Observações:" />
            <br />
            <asp:TextBox ID="txtObservacao" runat="server" TextMode="MultiLine" 
                Width="296px" />
            <br />
            <br />
            <asp:Button ID="btnSalvar" runat="server" Text="Salvar" OnClick="btnSalvar_Click" CssClass="Botao"/>
            <asp:Button ID="btnVoltar" runat="server" Text="Voltar" OnClick="btnVoltar_Click" CssClass="Botao" CausesValidation="false"/>
            <br />
        </asp:View>
    </asp:MultiView>
</asp:Content>
